from PyQt5.Qt import  *

class E_QSpinBox(QSpinBox):
    editingFinished = pyqtSignal(int)

    def __init__(self, parent=None):
        super(E_QSpinBox, self).__init__(parent)

    def leaveEvent(self, a0: QEvent) -> None:
        super().leaveEvent(a0)
        print("离开E_QSpinBox控件")
        self.editingFinished.emit(self.value())



class E_QDoubleSpinBox(QDoubleSpinBox):
    editingFinished = pyqtSignal(float)

    def __init__(self, parent=None):
        super(E_QDoubleSpinBox, self).__init__(parent)

    def leaveEvent(self, a0: QEvent) -> None:
        super().leaveEvent(a0)
        self.editingFinished.emit(self.value())